<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app1">
        <h1>我是app1 -- {{ msg }}</h1>
    </div>
    <div id="app2">
        <h1>我是app2 -- {{ msg }}</h1>
    </div>

    <script src="./vue.js"></script>
    <script>
        new Vue({
            el: '#app1',
            //template: '<h4>我在template里 -- {{msg}}</h4>',
            data() {
                return {
                    msg: '你好'
                }
            },
            mounted() {
                console.log(this)
            },
        }).$mount('#app2')
    </script>
</body>
</html>